import { AreaCalculation } from './01/lib/calculation'
// graph
import { Square, Rectangle } from './01/lib/graph'

{
  let square = new Square(5, 'green')
  let areaCalculation = new AreaCalculation(square) // 能够体现：依赖倒置原则
  areaCalculation.prinfArea()
}

{
  let rectangle = new Rectangle(5, 4, 'green')
  let areaCalculation = new AreaCalculation(rectangle) // 能够体现：依赖倒置原则
  areaCalculation.prinfArea()
}

//---------------------------------------

import { VolumeCalculation } from './01/lib/calculation'
// volumn
import { Cube, Cuboid } from './01/lib/volume'

{
  let cube = new Cube(4)
  let volumeCalculation = new VolumeCalculation(cube) // 能够体现：依赖倒置原则
  volumeCalculation.prinfArea()
  volumeCalculation.prinfBulk()
}

{
  let cuboid = new Cuboid(5, 4, 3)
  let volumeCalculation = new VolumeCalculation(cuboid) // 能够体现：依赖倒置原则
  volumeCalculation.prinfArea()
  volumeCalculation.prinfBulk()
}
